package com.myspring.sample.autowired;

import com.myspring.sample.model.mult_impl.MyImpl1;
import com.myspring.sample.model.mult_impl.MyImpl2;
import com.myspring.sample.model.mult_impl.MyInterface;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {

    @Bean
    public MyInterface myInterface1() {
        System.out.println("myInterface1");
        return new MyImpl1();
    }

    @Bean
    public MyInterface myInterface2() {
        System.out.println("myInterface2");
        return new MyImpl2();
    }
}
